package com.job.siteapp.domain;

import com.job.siteapp.common.globality.BaseEntity;

import javax.persistence.*;
import java.util.List;

/**
 * 热词评论
 * Created by Administrator on 2016-07-09-0009.
 */
@Entity
@Table(name = "site_comment",uniqueConstraints = {@UniqueConstraint(columnNames = "id")})
public class Comment extends BaseEntity implements java.io.Serializable {

    @Column(name = "word_id")
    private Long wordId;

    @Column(name = "user_id")
    private Long userId;

    @Column(name = "content", length = 65535, columnDefinition = "text")
    private String content;

    @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
    @JoinColumn(name = "comment_id", referencedColumnName = "id")
    private List<Dialogue> dialogue;

    public Long getWordId() {
        return wordId;
    }

    public void setWordId(Long wordId) {
        this.wordId = wordId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public List<Dialogue> getDialogue() {
        return dialogue;
    }

    public void setDialogue(List<Dialogue> dialogue) {
        this.dialogue = dialogue;
    }
}
